package com.xbfinal;

import com.xbfinal.core.Downloader;

import java.util.Scanner;

/**
 * @version 1.0
 * @Author 笑霸final
 * @Date 2023/10/18 18:12
 * @注释 https://dldir1.qq.com/qqfile/qq/PCQQ9.7.1/QQ9.7.1.28940.exe
 */
public class Main {
    public static void main(String[] args) {
        String url = null;
        Scanner scanner = new Scanner(System.in);
        if (args == null || args.length<1){
           while (url==null || " ".equals(url)){
               url = scanner.nextLine();
           }
        }else{
            url = args[0];
        }
        System.out.println("你输入的网址是： "+url);
        System.out.println("开始下载");
        Downloader downloader = new Downloader();
        downloader.download(url);
        System.out.print("\r");
        System.out.println("下载完毕");

    }
}